import { createRouter, createWebHistory } from 'vue-router'
import Home from "../views/HomePage.vue"
const routes = [
    { path: '/', redirect: '/home' },
    {
        path: '/home',
        component: Home,
        children: [
            {
                path: 'testmain',
                name: '测试主页',
                component: () => import('@/views/TestPart/index.vue')
            },
            {
                path: 'document',
                name: '文件管理',
                component: () => import('@/views/DocumentModule/index.vue')
            },
        ]
    }
]
const router = createRouter({
    routes,
    history: createWebHistory()    // history 模式
    // history: createWebHashHistory()   // hash 模式
});
export default router;